<html>
<head><meta charset="utf-8"><title>(De)serialization of dyn Error · project-error-handling · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/index.html">project-error-handling</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/(De)serialization.20of.20dyn.20Error.html">(De)serialization of dyn Error</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="210688340"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/%28De%29serialization%20of%20dyn%20Error/near/210688340" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jason Smith <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/(De)serialization.20of.20dyn.20Error.html#210688340">(Sep 20 2020 at 22:25)</a>:</h4>
<p>For a Spark-like application (or really any distributed application), how would you handle ser/deser of dyn Error? Is this a fundamental limitation of Rust error handling?</p>



<a name="210689054"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/%28De%29serialization%20of%20dyn%20Error/near/210689054" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/(De)serialization.20of.20dyn.20Error.html#210689054">(Sep 20 2020 at 22:45)</a>:</h4>
<p>it's not really fundamental but right now the error trait only exposes a small amount of context about the underlying error types</p>



<a name="210689101"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/%28De%29serialization%20of%20dyn%20Error/near/210689101" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/(De)serialization.20of.20dyn.20Error.html#210689101">(Sep 20 2020 at 22:46)</a>:</h4>
<p>so you can put msgs and debug fmts and source errors in it but you lose the type info</p>



<a name="210689108"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/%28De%29serialization%20of%20dyn%20Error/near/210689108" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/(De)serialization.20of.20dyn.20Error.html#210689108">(Sep 20 2020 at 22:46)</a>:</h4>
<p>I think you might be able to grab a type id</p>



<a name="210689120"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/%28De%29serialization%20of%20dyn%20Error/near/210689120" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/(De)serialization.20of.20dyn.20Error.html#210689120">(Sep 20 2020 at 22:46)</a>:</h4>
<p>this seems unrelated to api stability tho so maybe we need to split this into a new thread</p>



<a name="210691425"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/%28De%29serialization%20of%20dyn%20Error/near/210691425" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jake Goulding <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/(De)serialization.20of.20dyn.20Error.html#210691425">(Sep 20 2020 at 23:54)</a>:</h4>
<p><span class="user-mention" data-user-id="344334">@Jason Smith</span> <a href="https://stackoverflow.com/a/50026869/155423">How to implement <code>serde::Serialize</code> for a boxed trait object?</a> and <a href="https://stackoverflow.com/q/42392935/155423">How do I deserialize into trait, not a concrete type?</a></p>



<a name="210691982"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/%28De%29serialization%20of%20dyn%20Error/near/210691982" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/(De)serialization.20of.20dyn.20Error.html#210691982">(Sep 21 2020 at 00:11)</a>:</h4>
<p>I should really revive my errtools crate where I implemented serialization and deserialization for dyn errors already</p>



<a name="210691994"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257204-project-error-handling/topic/%28De%29serialization%20of%20dyn%20Error/near/210691994" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Jane Lusby <a href="https://rust-lang.github.io/zulip_archive/stream/257204-project-error-handling/topic/(De)serialization.20of.20dyn.20Error.html#210691994">(Sep 21 2020 at 00:11)</a>:</h4>
<p>and an ill advised version of SNAFUs context fn that is stand alone</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>